<style lang="scss" scoped>
.content {
  padding-top: 60px;
  position: fixed;
  width: 100%;
  height: 100%;
  .scoll {
    height: calc(100% - 180px);
    overflow: auto;
  }
  .navbar {
    width: 100%;
    height: 40px;
    font-size: 14px;
    background-color: #fff;
    border-top: 1px solid #dadada;
    border-bottom: 1px solid #dadada;
    padding-left: 20px;
    .left {
      width: 295px;
      height: 40px;
      float: left;
      padding-right: 10px;
      border-right: 1px solid #dadada;
      padding-left: 4px;
      .nav {
        height: 30px;
        margin: 0 auto;
        margin-top: 4px;
        border-radius: 15px;
        background-color: #f0efef;
        .z,
        .g {
          display: inline-block;
          width: 130px;
          height: 25px;
          margin-top: 2px;
          line-height: 25px;
          text-align: center;
          border-radius: 17.5px;
          color: #a1a1a1;
          cursor: pointer;
        }
        .g {
          width: 130px;
        }
        .active {
          color: #fff;
          margin: 0 4px;
          background-color: #4591ff;
        }
      }
    }
    .submit {
      float: right;
      font-size: 14px;
      height: 40px;
      .t {
        display: inline-block;
        position: relative;
        right: 30px;
        top: 8px;
        width: 58px;
        height: 24px;
        line-height: 24px;
        text-align: center;
        border-radius: 12px;
        background-color: #4591ff;
        color: #fff;
        cursor: pointer;
      }
    }
  }
  .center {
    max-width: 1366px;
    margin: 0 auto;
  }
  .section {
    max-width: 1366px;
    margin: 0 auto;
    font-size: 12px;
    padding-top: 15px;
    .left {
      width: 280px;
      // background: red;
      float: left;
      margin-left: 20px;
      position: relative;
      .lists {
        .list {
          cursor: pointer;
          border-radius: 2px;
          overflow: hidden;
          margin-bottom: 15px;
          .header {
            font-size: 13px;
            height: 35px;
            width: 100%;
            position: relative;
            line-height: 35px;
            background-color: #efefef;
            font-weight: 600;
            .task {
              float: left;
              width: 15px;
              height: 15px;
              margin: 10px 8px;
              background: url("../../../assets/img/task01.png") no-repeat center
                center;
              background-size: 15px;
            }
            .name {
              float: left;
              height: 100%;
              margin-right: 38px;
              max-width: 130px;
              overflow: hidden;
              white-space: nowrap;
              text-overflow: ellipsis;
              color: #212122;
            }
            .weight {
              float: left;
              margin-right: 2px;
            }
            .red {
              float: left;
              color: red;
            }
            .serial {
              display: inline-block;
              position: absolute;
              top: 0;
              right: 0;
              height: 35px;
              width: 35px;
              background: url("../../../assets/img/sj1.png") no-repeat;
              background-size: 35px;
            }
            .y {
              width: 12px;
              height: 12px;
              line-height: 11px;
              text-align: center;
              color: #fff;
              border-radius: 50%;
              border: 1px solid #fff;
              position: absolute;
              top: 4px;
              right: 4px;
              z-index: 2;
              font-size: 12px;
            }
          }
          .body {
            padding: 0 10px;
            float: left;
            box-sizing: border-box;
            border: 1px solid #e2e2e2;
            background-color: #fff;
            border-radius: 0px 0px 4px 4px;
            .p {
              width: 100%;
              height: 32px;
              line-height: 32px;
              float: left;
              .left {
                float: left;
                width: 68px;
                margin: 0;
                color: #666665;
              }
              .right {
                float: left;
                width: 190px;
                height: 32px;
                text-align: right;
                margin: 0;
                overflow: hidden;
                white-space: nowrap;
                text-overflow: ellipsis;
                color: #323233;
              }
              .red {
                color: red;
              }
            }
            .p_last {
              float: left;
              width: 100%;
              height: 32px;
              line-height: 32px;
              text-align: center;
              color: #b9b9b9;
              .date {
                margin: 0 2px;
              }
            }
          }
        }
        .active {
          .header {
            background: #e2ecfa;
            .task {
              float: left;
              width: 15px;
              height: 15px;
              margin: 10px 8px;
              background: url("../../../assets/img/task.png") no-repeat center
                center;
              background-size: 15px;
            }
            .serial {
              display: inline-block;
              position: absolute;
              top: 0;
              right: 0;
              height: 35px;
              width: 35px;
              background: url("../../../assets/img/sj.png") no-repeat;
              background-size: 35px;
            }
          }
          .body {
            background: #f3f7fb;
          }
          &::before {
            content: "";
            position: absolute;
            top: 50px;
            left: 0px;
            display: inline-block;
            width: 3px;
            height: 85px;
            z-index: 10;
            border-radius: 0px 4px 4px 0px;
            // border-radius: 20px;
            background-color: #5797f0;
          }
        }
      }
    }
    .right {
      margin-right: 20px;
    }
  }
}
</style>
<template>
  <div class="content">
    <bxHeader />
    <bxTitle />
    <bxTab />
    <div class="scoll">
      <titleInfo />
      <div class="navbar">
        <div class="center">
          <div class="left">
            <div class="nav">
              <span class="z active">重要任务</span>
              <span class="g">关键指标</span>
            </div>
          </div>
          <div class="submit">
            <span class="t" @click="modiPwd">提交</span>
          </div>
        </div>
      </div>
      <div class="section">
        <div class="left">
          <ul class="lists">
            <li class="list active">
              <div class="header">
                <div class="task" />
                <i class="name">推动落实改革三年行动</i>
                <i class="weight">权重:</i>
                <i class="red">8%</i>
                <div class="serial" />
                <i class="y">1</i>
              </div>
              <div class="body">
                <p class="p">
                  <span class="left">任务内容</span>
                  <span
                    class="right"
                  >围绕全面深化改革重点领域和关键环节,协...</span>
                </p>
                <p class="p">
                  <span class="left">完成时间</span>
                  <span class="right red">2021/12/31</span>
                </p>
                <p class="p">
                  <span class="left">任务来源</span>
                  <span class="right">集团年度重点任务分解</span>
                </p>
                <p class="p_last">
                  吴青贤
                  <i class="date">2021-03-01</i>
                  <i class="date">11:00:02</i>
                  提交
                </p>
              </div>
            </li>
            <li class="list">
              <div class="header">
                <div class="task" />
                <i class="name">推动落实改革三年行动</i>
                <i class="weight">权重:</i>
                <i class="red">8%</i>
                <div class="serial" />
                <i class="y">2</i>
              </div>
              <div class="body">
                <p class="p">
                  <span class="left">任务内容</span>
                  <span
                    class="right"
                  >围绕全面深化改革重点领域和关键环节,协...</span>
                </p>
                <p class="p">
                  <span class="left">完成时间</span>
                  <span class="right red">2021/12/31</span>
                </p>
                <p class="p">
                  <span class="left">任务来源</span>
                  <span class="right">集团年度重点任务分解</span>
                </p>
                <p class="p_last">
                  吴青贤
                  <i class="date">2021-03-01</i>
                  <i class="date">11:00:02</i>
                  提交
                </p>
              </div>
            </li>
            <li class="list">
              <div class="header">
                <div class="task" />
                <i class="name">推动落实改革三年行动</i>
                <i class="weight">权重:</i>
                <i class="red">8%</i>
                <div class="serial" />
                <i class="y">3</i>
              </div>
              <div class="body">
                <p class="p">
                  <span class="left">任务内容</span>
                  <span
                    class="right"
                  >围绕全面深化改革重点领域和关键环节,协...</span>
                </p>
                <p class="p">
                  <span class="left">完成时间</span>
                  <span class="right red">2021/12/31</span>
                </p>
                <p class="p">
                  <span class="left">任务来源</span>
                  <span class="right">集团年度重点任务分解</span>
                </p>
                <p class="p_last">
                  吴青贤
                  <i class="date">2021-03-01</i>
                  <i class="date">11:00:02</i>
                  提交
                </p>
              </div>
            </li>
          </ul>
        </div>
        <div class="right">
          <bxRight />
        </div>
      </div>
    </div>
    <bxFooter />
    <!-- 弹窗 -->
    <el-dialog
      class="myimport"
      title="导入"
      :visible.sync="dialogVisible"
      width="55%"
      :before-close="handleClose"
      append-to-body
      style="font-size: 12px !important"
      top="25vh"
    >
      <!-- 下载 -->
      <div v-show="mainActive === '1'" class="main">
        <div class="steps">
          <span class="one">
            <i class="yuan yuanActive">1</i>
            <i class="title">
              下载模板
              <i class="info">下载Excel格式模板,本导入</i>
            </i>
            <i class="xian xianActive" />
          </span>
          <span class="one">
            <i class="yuan">2</i>
            <i class="title">
              上传表格
              <i class="info">填写完成Excel表格,上传</i>
            </i>
            <i class="xian" />
          </span>
          <span class="one last">
            <i class="yuan">3</i>
            <i class="title">
              写入数据
              <i class="info">验证格式并写入数据</i>
            </i>
          </span>
        </div>
        <div class="displayshow">
          <div class="displayshowimg">
            <img src="../../../assets/img/microsoftexcel.png" alt="">
          </div>
          <div class="displayshowbtn">
            <el-button round>下载模板</el-button>
          </div>
        </div>
        <div class="tipsTitle">
          备注：请严格按照模板填写表格
        </div>
        <div class="footer">
          <el-button size="medium" type="primary" round @click="nextStep('2')">下一步</el-button>
        </div>
      </div>
      <!-- 上传 -->
      <div v-show="mainActive === '2'" class="main">
        <div class="steps">
          <span class="one">
            <i class="yuan yuanActive">1</i>
            <i class="title">
              下载模板
              <i class="info">下载Excel格式模板,本导入</i>
            </i>
            <i class="xian xianActive" />
          </span>
          <span class="one">
            <i class="yuan yuanActive">2</i>
            <i class="title">
              上传表格
              <i class="info">填写完成Excel表格,上传</i>
            </i>
            <i class="xian" />
          </span>
          <span class="one last">
            <i class="yuan">3</i>
            <i class="title">
              写入数据
              <i class="info">验证格式并写入数据</i>
            </i>
          </span>
        </div>
        <div class="displayshow">
          <div class="displayshowimg">
            <img v-show="isSucess" src="../../../assets/img/m1icrosoftexcel.png" alt="">
            <img v-show="!isSucess" src="../../../assets/img/sucess.png" alt="">
          </div>

          <div class="displayshowbtn">
            <el-button v-show="isSucess" round @click="addClick()">上传模板</el-button>
            <span v-show="!isSucess" class="sucessContent">您上传得20-工会、团委、宝武大学-张贺雷-20210401上传成功 <span>x</span></span>
          </div>
        </div>
        <div class="tipsTitle">
          <!-- 备注：请严格按照模板填写表格 -->
        </div>
        <div class="footer">
          <el-button size="medium" round @click="nextStep('1')">上一步</el-button>
          <el-button size="medium" type="primary" round @click="nextStep('3')">下一步</el-button>
        </div>
      </div>
      <!-- 导入完成 -->
      <div v-show="mainActive === '3'" class="main">
        <div class="steps">
          <span class="one">
            <i class="yuan yuanActive">1</i>
            <i class="title">
              下载模板
              <i class="info">下载Excel格式模板,本导入</i>
            </i>
            <i class="xian xianActive" />
          </span>
          <span class="one">
            <i class="yuan yuanActive">2</i>
            <i class="title">
              上传表格
              <i class="info">填写完成Excel表格,上传</i>
            </i>
            <i class="xian xianActive" />
          </span>
          <span class="one last">
            <i class="yuan yuanActive">3</i>
            <i class="title">
              写入数据
              <i class="info">验证格式并写入数据</i>
            </i>
          </span>
        </div>
        <div class="displayshow">
          <div class="displayshowimg">
            <img class="importimg" src="../../../assets/img/complete.png" alt="">
          </div>

          <div class="displayshowbtn importend">
            导入完成
          </div>
        </div>
        <div class="tipsTitle">
          <!-- 备注：请严格按照模板填写表格 -->
        </div>
        <div class="footer">
          <el-button size="medium" round @click="nextStep('2')">上一步</el-button>
          <el-button size="medium" type="primary" round @click="importsucess()">完成</el-button>
        </div>
      </div>
    </el-dialog>
  </div>
</template>
<script>
import bxHeader from '@/components/headerFooter/header'
import bxTab from '@/components/tab/index'
import bxTitle from '@/components/tab/title'
import titleInfo from '@/components/tab/titleInfo'
import bxFooter from '@/components/headerFooter/footer'
import bxRight from '@/views/dashboard/changeRecord/changeRecord.vue'
export default {
  components: {
    bxFooter,
    bxHeader,
    bxTab,
    bxTitle,
    titleInfo,
    bxRight
  },
  data() {
    return {
      input: '',
      dialogVisible: false,
      mainActive: '1',
      isSucess: true,
      sucesskey: 0,
      importantActive: true
    }
  },
  methods: {
    modiPwd() {
      this.dialogVisible = true
    },
    handleClose(done) {
      this.$confirm('确认关闭？')
        .then((_) => {
          done()
        })
        .catch((_) => {})
    },
    // 下一步/上一步
    nextStep(val) {
      // console.log(val)
      if (this.mainActive === '1') {
        this.isSucess = true
      }
      this.mainActive = val
    },
    addClick() {
      this.isSucess = false
    },
    importsucess() {
      this.dialogVisible = false
    },
    gotoPage() {
      this.$router.push({
        path: '/checkSubordinatesview'
      })
    },
    theKeyClick(val) {
      if (val === '1') {
        this.importantActive = false
      } else {
        this.importantActive = true
      }
    }
  }
}
</script>
<style lang="scss">
.myimport {
  .el-dialog {
    width: 736px !important;
    height: 360px;
    .el-dialog__header {
      height: 45px;
      padding: 15px 15px 0 30px;
      .el-dialog__title {
        position: relative;
        font-size: 14px;
        font-weight: 600;
        line-height: 7px;
        &::before {
          content: "";
          position: absolute;
          top: 1px;
          left: -10px;
          display: block;
          width: 3px;
          height: 14px;
          background-color: #4b92f7;
        }
      }
      .el-dialog__headerbtn {
        top: 12px;
      }
    }
  }
  .el-dialog__body {
    padding: 0;
    .main {
      width: 694px;
      margin: 0 auto;
      border-top: 1px solid #d4d4d4;
      padding-top: 22px;
      .steps {
        width: 665px;
        height: 45px;
        margin: 0 auto;
        // background: rgb(233, 203, 203);
        .one {
          float: left;
          width: 255px;
          .yuan {
            float: left;
            width: 27px;
            height: 27px;
            line-height: 27px;
            text-align: center;
            border-radius: 50%;
            border: 1px solid #999;
          }
          .yuanActive{
            border: 1px solid #448EF7;
            background: #448EF7;
            color: #fff;
          }
          .title {
            position: relative;
            float: left;
            margin: 0 16px 0 11px;
            font-size: 13px;
            line-height: 30px;
            .info {
              float: left;
              position: absolute;
              top: 22px;
              left: 0;
              width: 150px;
              font-size: 12px;
              overflow: hidden;
              white-space: nowrap;
              text-overflow: ellipsis;
              color: rgb(170, 169, 169);
            }
          }
          .xian {
            float: left;
            width: 135px;
            height: 2.5px;
            background-color: #999;
            margin-top: 14px;
          }
          .xianActive{
            background-color: #448EF7;
          }
        }
        .last {
          float: left;
          width: 150px;
        }
      }
      .displayshow {
        width: 100%;
        height: 115px;
        margin: 26px 0;
        overflow: hidden;
        .displayshowimg{
          width: 100%;
          text-align: center;
          margin-top: 10px;
          img{
            width: 60px;
          }
          .importimg{
            width: 120px;
          }
        }
        .displayshowbtn{
          text-align: center;
          margin-top: 10px;
          .sucessContent{
            width: 80%;
            display: block;
            background: #F8F8F8;
            margin: 0 auto;
            height: 30px;
            line-height: 30px;
            text-align: left;
            padding: 0 2%;
            span{
              float: right;
              cursor: pointer;
              width: 20px;
              text-align: center;
            }
          }
        }
        .importend{
          color: #448EF7;
        }
      }
      .tipsTitle{
        width: 100%;
        text-align: left;
        color: #CF352E;
        height: 30px;
        font-family: PingFang SC;
      }
      .footer {
        width: 100%;
        text-align: right;
      }
    }
  }
}
</style>
